import routers from "./router";
routers.beforeEach((to, from, next) => {
    if (to.name === 'TebaleAdmin') {
        console.log(localStorage.getItem('token'), '拦截器')
        if (localStorage.getItem('token')) {
            next()
        } else {
            next({ name: 'Login' })
        }

    } else {
        next()
    }
})